From 2763c22ebac4e6990b90f7a5db62f4d0e58d7e49 Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Thu, 14 Jul 2011 13:22:36 +0100 Subject: [PATCH] libxl: IDL: bring command line handling in genwrap.py into one place. Signed-off-by: Ian Campbell Committed-by: Ian Jackson --- tools/libxl/gentypes.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tools/libxl/gentypes.py b/tools/libxl/gentypes.py index 8c8ffc26df..120c6d357e 100644 --- a/tools/libxl/gentypes.py +++ b/tools/libxl/gentypes.py @@ -137,14 +137,14 @@ def libxl_C_enum_from_string(ty, str, e, indent = " "): if __name__ == '__main__': - if len(sys.argv) < 4: + if len(sys.argv) != 4: print >>sys.stderr, "Usage: gentypes.py
" sys.exit(1) - idl = sys.argv[1] + (_, idl, header, impl) = sys.argv + (_,types) = libxltypes.parse(idl) - header = sys.argv[2] print "outputting libxl type definitions to %s" % header f = open(header, "w") @@ -174,7 +174,6 @@ if __name__ == '__main__': f.write("""#endif /* __LIBXL_TYPES_H */\n""") f.close() - impl = sys.argv[3] print "outputting libxl type implementations to %s" % impl f = open(impl, "w") -- 2.30.2